package com.pervasa.demo.re.impl.command;

public class IdentToken extends Token {
	public final String spelling;

	public IdentToken(String spelling) {
		super(Kind.IDENT);
		this.spelling = spelling;
	}

	@Override
	public String toString() {
		return kind + ": " + spelling;
	}

	public boolean equals(Object t) {
		if (!super.equals(t)) {
			return false;
		}
		IdentToken otherIdentToken = (IdentToken) t;
		return (otherIdentToken.spelling == spelling)
				|| ((spelling != null) && spelling
						.equals(otherIdentToken.spelling));

	}

	public int hashCode() {
		assert false : "hashCode method not designed";
		return 42;
	}

}
